{% extends "admin/_admin_base.html" %}

{% block subtitle %}Listing{% endblock %}

{% block main_column %}
    {% for message in messages_list.object_list %}
        {% include 'admin/single_message_admin.html' %}
    {% empty %}
        <p>No messages to display</p>
    {% endfor %}
    
    <div class="pagination">
        <span class="step-links">
            {% if messages_list.has_previous %}
                <a href="?page={{ messages_list.previous_page_number }}">previous</a>
            {% endif %}

            <span class="current">
                Page {{ messages_list.number }} of {{ messages_list.paginator.num_pages }}.
            </span>

            {% if messages_list.has_next %}
                <a href="?page={{ messages_list.next_page_number }}">next</a>
            {% endif %}
        </span>
    </div>
{% endblock %}
